package com.kushe.site.form;

import org.jreform.HtmlForm;

import static org.jreform.criteria.Criteria.emailAddress;
import static org.jreform.criteria.Criteria.length;

/**
 * Created by WhiteBlue on 15/4/1.
 */
public class RegisterForm extends HtmlForm {
    public RegisterForm() {
        input(stringType(), "email", length(5, 30));
        input(stringType(), "name", length(2, 20));
        input(stringType(), "password", length(5, 30));
    }

    public String getName() {
        return (String) getInput("name").getValue();
    }

    public String getPassword() {
        return (String) getInput("password").getValue();
    }

    public String getEmail() {
        return (String) getInput("email").getValue();
    }

}
